#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "Serial.h"
#include "Pwm.h"

void X_Pwm(int16_t ccr)
{
	if(ccr>=2600) TIM_SetCompare2(TIM2,2600);
	else if(ccr<=400) TIM_SetCompare2(TIM2,400);
	else TIM_SetCompare2(TIM2,ccr);
}

void Y_Pwm(int16_t ccr)
{
	if(ccr>=2600) TIM_SetCompare1(TIM2,2600);
	else if(ccr<=1100) TIM_SetCompare1(TIM2,1100);
	else TIM_SetCompare1(TIM2,ccr);
}